Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Min/max version for the tagline #5917

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

g123k
Copy link
Collaborator

@g123k g123k commented Nov 24, 2024

Hi everyone!

The JSON can now provide a min_version and/or a max_version for each news item.
Some examples:

  • Only max_version: a message to notify there's an update available
  • min_version only or min_version=max_version: changelog of new features

By version, it's not the version code, but the version name (e.g.: 1.2.3)

In this PR, there's also a fix, where sometimes the Tagline is not visible (mainly at launch) and the DEV Mode status is not refreshing.

@g123k g123k linked an issue Nov 24, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 44 lines in your changes missing coverage. Please review.

Project coverage is 6.59%. Comparing base (4d9c7fc) to head (7e973c3).
Report is 504 commits behind head on develop.

Files with missing lines Patch % Lines
...h_app/lib/data_models/news_feed/newsfeed_json.dart 0.00% 29 Missing ⚠️
...p/lib/data_models/news_feed/newsfeed_provider.dart 0.00% 9 Missing ⚠️
..._app/lib/data_models/news_feed/newsfeed_model.dart 0.00% 5 Missing ⚠️
...b/pages/preferences/user_preferences_dev_mode.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5917      +/-   ##
==========================================
- Coverage     9.54%   6.59%   -2.95%     
==========================================
  Files          325     436     +111     
  Lines        16411   24563    +8152     
==========================================
+ Hits          1567    1621      +54     
- Misses       14844   22942    +8098     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@@ -316,7 +316,7 @@ class UserPreferencesDevMode extends AbstractUserPreferences {
return Consumer<AppNewsProvider>(
builder: (_, AppNewsProvider provider, __) {
return Text(switch (provider.state) {
AppNewsStateLoading() => 'Loading...',
AppNewsStateLoading() => 'Loading',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we extract this ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the Dev mode, but yes, I can translate it

@teolemon teolemon merged commit 6c6eae0 into openfoodfacts:develop Nov 26, 2024
6 checks passed
@g123k g123k deleted the tagline_refeshing branch November 28, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Tagline: support min/max version
3 participants